<?php
Route::group(['namespace' => 'Admin'], function () {
    //登录、注销
    Route::post('login', 'LoginController@login');
    Route::post('logout', 'LoginController@logout');
    Route::any('laravel_server', 'ToolsController@server');
    Route::post('uploads', 'ToolsController@uploads');
    Route::post('imageUpload', 'ToolsController@imageUpload');
    Route::post('videoUpload', 'ToolsController@videoUpload');
});

Route::group(['namespace' => 'Admin', 'middleware' => 'admin'], function () {
    Route::post('getYtkMenus', 'IndexController@getYtkMenus');
    Route::post('userInfo', 'IndexController@userInfo');
    Route::post('gerRoleList', 'IndexController@gerRoleList');

    Route::post('index/getIndexData', 'IndexController@getIndexData');
    Route::post('index/getUsersData', 'IndexController@getUsersData');
    Route::post('index/getNewsData', 'IndexController@getNewsData');

    Route::post('config/site', 'ConfigController@site');
    Route::post('config/siteupdate', 'ConfigController@siteupdate');

    Route::post('advert/index', 'AdvertController@index');
    Route::post('advert/detail', 'AdvertController@detail');
    Route::post('advert/beforeSave', 'AdvertController@beforeSave');
    Route::post('advert/destroy', 'AdvertController@destroy');
    Route::post('advert/setStatus', 'AdvertController@setStatus');

    Route::post('dict/index', 'DictController@index');
    Route::post('dict/detail', 'DictController@detail');
    Route::post('dict/beforeSave', 'DictController@beforeSave');
    Route::post('dict/destroy', 'DictController@destroy');
    Route::post('getDict', 'DictController@getDict');

    Route::post('service/index', 'ServiceController@index');
    Route::post('service/detail', 'ServiceController@detail');
    Route::post('service/beforeSave', 'ServiceController@beforeSave');
    Route::post('service/destroy', 'ServiceController@destroy');
    Route::post('service/setStatus', 'ServiceController@setStatus');

    Route::post('article/index', 'ArticleController@index');
    Route::post('article/detail', 'ArticleController@detail');
    Route::post('article/beforeSave', 'ArticleController@beforeSave');
    Route::post('article/destroy', 'ArticleController@destroy');
    Route::post('article/setIndex', 'ArticleController@setIndex');

    Route::post('article/class/index', 'ArticleClassController@index');
    Route::post('article/class/detail', 'ArticleClassController@detail');
    Route::post('article/class/beforeSave', 'ArticleClassController@beforeSave');
    Route::post('article/class/destroy', 'ArticleClassController@destroy');
    Route::post('article/getArticleClass', 'ArticleClassController@getArticleClass');

    Route::post('house/index', 'HouseController@index');
    Route::post('getHouse', 'HouseController@getHouse');
    Route::post('house/detail', 'HouseController@detail');
    Route::post('house/beforeSave', 'HouseController@beforeSave');
    Route::post('house/destroy', 'HouseController@destroy');
    Route::post('house/setIndex', 'HouseController@setIndex');
    Route::post('house/setPuts', 'HouseController@setPuts');

    Route::post('area/index', 'AreaController@index');
    Route::post('area/detail', 'AreaController@detail');
    Route::post('area/beforeSave', 'AreaController@beforeSave');
    Route::post('area/destroy', 'AreaController@destroy');
    Route::post('getArea', 'AreaController@getArea');

    //后台菜单列表
    Route::post('authMenu/index', 'AuthMenuController@index');
    Route::post('authMenu/beforeSave', 'AuthMenuController@beforeSave');
    Route::post('authMenu/detail', 'AuthMenuController@detail');
    Route::post('authMenu/destroy', 'AuthMenuController@destroy');
    Route::post('authMenu/setStatus', 'AuthMenuController@setStatus');
    Route::post('authMenu/setting', 'AuthMenuController@setting');

    //后台角色列表
    Route::post('authRole/index', 'AuthRoleController@index');
    Route::post('authRole/beforeSave', 'AuthRoleController@beforeSave');
    Route::post('authRole/detail', 'AuthRoleController@detail');
    Route::post('authRole/destroy', 'AuthRoleController@destroy');
    Route::post('authRole/setAuthRole', 'AuthRoleController@setAuthRole');

    //后台管理员列表
    Route::post('admin/index', 'AdminController@index');
    Route::post('admin/beforeSave', 'AdminController@beforeSave');
    Route::post('admin/detail', 'AdminController@detail');
    Route::post('admin/destroy', 'AdminController@destroy');
    Route::post('admin/setStatus', 'AdminController@setStatus');
    Route::post('admin/setColumn', 'AdminController@setColumn');

    //图片管理
    Route::post('Photos/index', 'PhotosController@index');
    Route::post('Photos/store', 'PhotosController@store');
    Route::post('Photos/edit', 'PhotosController@edit');
    Route::post('Photos/update', 'PhotosController@update');
    Route::post('Photos/destroy', 'PhotosController@destroy');
    Route::post('Photos/getCate', 'PhotosController@getCate');
    Route::post('Photos/editCat', 'PhotosController@editCat');

    //图片分类
    Route::post('PhoCate/index', 'PhotosCateController@index');
    Route::post('PhoCate/getCatCount', 'PhotosCateController@getCatCount');
    Route::post('PhoCate/store', 'PhotosCateController@store');
    Route::post('PhoCate/edit', 'PhotosCateController@edit');
    Route::post('PhoCate/update', 'PhotosCateController@update');
    Route::post('PhoCate/destroy', 'PhotosCateController@destroy');


});


